package com.lzhl.imaging.ui;

import javax.swing.*;
import java.awt.*;

/**
 * @author 李柱良(@柱子的日月)
 * @date 2014/8/27
 */
public class TheoryUI extends DialogUI {

    public TheoryUI(Frame owner) {
        super(owner, "关于", false);

        jbinit();

        pack();
        setLocationRelativeTo(owner);
        setVisible(true);
    }

    private void jbinit() {
        JPanel container = (JPanel) getContentPane();
        container.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        container.setLayout(new BorderLayout());

        Box box = Box.createVerticalBox();
        container.add(box, BorderLayout.CENTER);

        JLabel lb;

        Box boxJielun = Box.createHorizontalBox();
        box.add(boxJielun);
        lb = new JLabel("结论：");
        boxJielun.add(lb);
        lb = new JLabel("光圈越大，景深越小；光圈越小，景深越大");
        boxJielun.add(lb);
        boxJielun.add(Box.createHorizontalGlue());

        boxJielun = Box.createHorizontalBox();
        box.add(boxJielun);
        lb = new JLabel("　　　");
        boxJielun.add(lb);
        lb = new JLabel("焦距越长，景深越小；焦距越短，景深越大");
        boxJielun.add(lb);
        boxJielun.add(Box.createHorizontalGlue());

        boxJielun = Box.createHorizontalBox();
        box.add(boxJielun);
        lb = new JLabel("　　　");
        boxJielun.add(lb);
        lb = new JLabel("摄距越近，景深越小；摄距越远，景深越大");
        boxJielun.add(lb);
        boxJielun.add(Box.createHorizontalGlue());
    }

}
